Personal computers (PCs) are used commonly in the fields of business, finance, academia and industry and in the home. The prevalence of PCs has become such that users are growing increasingly dependent on the inbuilt reliability of their computers. This has resulted in users becoming complacent when maintaining data and system files and creating “back up” records. Furthermore, users often expect inbuilt retrieval systems to exist which facilitate reconstruction of the records if a system failure occurs.
In general, PCs include at least one disc drive which is used to store the system's operating system software and data files which are created and manipulated in everyday use. In a typical disc drive, data is recorded in a plurality of generally circular concentric tracks on the surfaces of one or more discs. The discs are axially aligned and mounted to a hub of a spindle motor for rotation. An array of vertically aligned read/write heads are configured to write to or read from the disc surfaces. During seek operations, the read/write heads are controllably moved from track to track by an actuator assembly, so that data can be written to or read from different concentric tracks.
Along each track, data is stored in addressable sectors. A typical format usually includes a Master Boot Record (MBR) located at the very first address, Logical Block Address 0 (LBA0), of the disc. The MBR is accessed by the host system when it is powered or “booted” up and contains a partition table which points to primary partitions on the disc drive.
A disc drive can be arranged such that it contains up to four primary partitions, each of which can be pointed to by the MBR. However, some operating systems restrict partitioning of the disc drive such that there is only one primary partition. Extended partitions may be defined if necessary. Furthermore, each primary or extended partition can be subdivided into logical partitions.
The MBR contained in the primary partition references the location of other primary partitions on the disc drive, and the next adjacent extended partition. An Extended Master Boot Record (EMBR) is located in the first sector of each extended partition, and provides the location of the next extended partition on the disc. Extended partitions contain a boot sector (beginning in the second sector in the partition) in addition to File Allocation Tables (FATs) which are also referenced by the EMBR.
In addition to the partition tables, the MBR contains code which is loaded into the random access memory (RAM) of the computer using the ROM-BIOS (read only memory Basic Input/Output System) and which is responsible for the installation of the operating system when the power is switched on. The ROM-BIOS generally contains an instruction at its first address location which instructs the system to read the MBR of the first primary partition which subsequently results in the retrieval of code from the boot sector of that partition. The boot sector instructs the computer to load the operating system software, which is generally stored in system files and data files in the primary partition, into the RAM. Control is then transferred to the operating system which coordinates and controls the functions of the computer's central processing unit (CPU) and peripheral devices.
FATs keep track of files which are stored in partitions on the disc drive. The FATs also maintain a set of attributes for each file, such as whether the file is one of a system data set, whether it should remain hidden in the directory display, whether it should be archived the next time that the disc is backed up and whether the file is read only, in addition to a date and time stamp which stipulates when the file was created or last changed. When files are stored, they are placed in sectors on the disc. Many files will not fit into a single sector, and the number of sectors which is required to store a file may not be available in adjacent sectors in the partition. Hence the file will need to be stored in sectors which are dispersed throughout the partition in different tracks. Furthermore, as additional files are created, deleted and modified, they change in length and may require the use of extra sectors, or may free up one or more sectors.
The FAT provides a record of the locations of the dispersed sectors which are used to store each file, enabling the operating system to retrieve file data from these dispersed sectors and reconstruct the files accordingly. This method of file storage is spatially efficient as the sector size can be designated such that it is not so large that space is frequently wasted on small files, or so small that many sectors are required to store each file and time is wasted while the disc heads continually move to access the next sector in the file. However, files are often divided up into pieces and scattered all over the disc, and in time the partition becomes fragmented.
Although disc drive fragmentation and non-contiguous storage of file clusters is usually transparent to the user, they can result in slower file retrieval times. This is because the read operations may be interrupted by seek operations when the actuator assembly moves the read/write heads to another track to read the sector storing the next file cluster. Disc drive fragmentation therefore places an extra load on the system as the read/write heads must make many accesses to different locations or to different tracks in one partition in order to reconstruct a single file. Consequently, system crashes may occur more frequently.
Defragmentation and optimization software utilities are available with most operating systems, but computer users who are not familiar with the physical structure and use of their disc drives rarely consider the importance of frequent defragmentation or disc optimization.
Occasionally, system errors occur, wherein a FAT is corrupted or destroyed. Ordinarily, this would mean that data which was stored on the disc would be irretrievably and permanently lost. However, the importance of the FAT in data recovery has been recognized, and system developers have designed disc drives which maintain a copy of each FAT in a partition. It has been shown that the probability of both copies of a FAT being corrupted by the same system error is minimal; hence the duplicate storage method is sufficient for repairing damage done to a partition as a result of a system error. No such precautions have been taken with the MBR or EMBRs.
Because each primary partition is pointed to directly by the MBR, the consequence of a corrupt primary partition table in any partition other than the first primary partition is not deleterious to any primary partition which lies outside of that partition. The remaining primary partitions each contain their own MBR which is referenced by the partition information in the MBR of the first primary partition. As a result, each primary partition may be referenced independently of other primary partitions. If the partition table for the first primary partition can be recovered, its file system can be restored, and in the meantime, the remaining primary partitions will still be functional. However, many operating systems, when installed on a PC, prevent the structuring of a disc drive such that there is more than one primary partition. Since the existence of only one primary partition means that only one partition can be referenced by the MBR when the system is booted up, only one operating system can control the CPU (since a system cannot be booted from an extended or logical partition). Software is available which overrides these limitations, but the regular user of a PC is not likely to use it to create more than one primary partition on their disc drive.
The limitation of having only one primary partition per disc drive does not affect most computer users in an adverse manner, as extended partitions can still be allocated in the disc drive, facilitating organized filing habits and data storage. However, the MBR cannot reference more than one extended partition directly from LBA0. Instead, the MBR is provided with a reference to the boot sector of the primary partition and the EMBR of the first extended partition. The EMBR of the first extended partition provides a reference to the EMBR of the second extended partition, which similarly provides a reference to the EMBR of the third (and final) extended partition.
The difficulty with the system, as it presently exists, is that the corruption or destruction of the MBR in operating systems where only one primary partition is permitted results in a loss of all references to other partitions in the disc drive. That is, because of the forward-linked nature of the MBR and EMBRs, the MBR is the only record which is able to determine the location of partition tables and subsequent FATs situated anywhere on the hard drive. Although duplicates are made of all FATs, they cannot be referenced without the MBR (or EMBR in extended partitions) which directs the operating system to the location of these FATs. Current systems provide backup MBRs which effectively reinstall the MBR using an auxiliary device such as floppy disc drive or a CD-ROM drive, but this method is ineffective if the structure of the disc drive has been altered since the back-up MBR was created (e.g. if the disc drive has been reformatted and no back-up created). Furthermore, reinstallation of the MBR requires significant user-intervention. Similarly, destruction of an EMBR results in loss of all references to other extended partitions which are referred to, either directly or indirectly, by that EMBR.
What the prior art is missing is a method of maintaining partition information in a disc drive that requires minimal user intervention.